home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 4.6 KB | 212 lines | [TEXT/MPS ] |
- ;
- ; File: Processes.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__PROCESSES__') = 'UNDEFINED' THEN
- __PROCESSES__ SET 1
-
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
- include 'Events.a'
- ENDIF
- ; include 'Quickdraw.a' ;
- ; include 'MixedMode.a' ;
- ; include 'QuickdrawText.a' ;
- ; include 'OSUtils.a' ;
- ; include 'Memory.a' ;
-
- IF &TYPE('__FILES__') = 'UNDEFINED' THEN
- include 'Files.a'
- ENDIF
- ProcessSerialNumber RECORD 0
- highLongOfPSN ds.l 1
- lowLongOfPSN ds.l 1
- sizeof EQU 8
- ENDR
-
-
- ; Process identifier - Various reserved process serial numbers
- kNoProcess EQU 0
- kSystemProcess EQU 1
- kCurrentProcess EQU 2
-
- ; Definition of the parameter block passed to _Launch
- ; Typedef and flags for launchControlFlags field
- ; Definition of the parameter block passed to _Launch
- launchContinue EQU $4000
- launchNoFileFlags EQU $0800
- launchUseMinimum EQU $0400
- launchDontSwitch EQU $0200
- launchAllow24Bit EQU $0100
- launchInhibitDaemon EQU $0080
-
- ; Format for first AppleEvent to pass to new process. The size of the overall
- ; buffer variable: the message body immediately follows the messageLength
- AppParameters RECORD 0
- theMsgEvent ds EventRecord
- eventRefCon ds.l 1
- messageLength ds.l 1
- sizeof EQU 24
- ENDR
-
- ; Parameter block to _Launch
- LaunchParamBlockRec RECORD 0
- reserved1 ds.l 1
- reserved2 ds.w 1
- launchBlockID ds.w 1
- launchEPBLength ds.l 1
- launchFileFlags ds.w 1
- launchControlFlags ds.w 1
- launchAppSpec ds.l 1
- launchProcessSN ds ProcessSerialNumber
- launchPreferredSize ds.l 1
- launchMinimumSize ds.l 1
- launchAvailableSize ds.l 1
- launchAppParameters ds.l 1
- sizeof EQU 44
- ENDR
-
- ; Set launchBlockID to extendedBlock to specify that extensions exist.
- ; Set launchEPBLength to extendedBlockLen for compatibility.
-
- ; Definition of the information block returned by GetProcessInformation
- modeDeskAccessory EQU $00020000
- modeMultiLaunch EQU $00010000
- modeNeedSuspendResume EQU $00004000
- modeCanBackground EQU $00001000
- modeDoesActivateOnFGSwitch EQU $00000800
- modeOnlyBackground EQU $00000400
- modeGetFrontClicks EQU $00000200
- modeGetAppDiedMsg EQU $00000100
- mode32BitCompatible EQU $00000080
- modeHighLevelEventAware EQU $00000040
- modeLocalAndRemoteHLEvents EQU $00000020
- modeStationeryAware EQU $00000010
- modeUseTextEditServices EQU $00000008
- modeDisplayManagerAware EQU $00000004
-
- ; Record returned by GetProcessInformation
- ProcessInfoRec RECORD 0
- processInfoLength ds.l 1
- processName ds.l 1
- processNumber ds ProcessSerialNumber
- processType ds.l 1
- processSignature ds.l 1
- processMode ds.l 1
- processLocation ds.l 1
- processSize ds.l 1
- processFreeMem ds.l 1
- processLauncher ds ProcessSerialNumber
- processLaunchDate ds.l 1
- processActiveTime ds.l 1
- processAppSpec ds.l 1
- sizeof EQU 60
- ENDR
-
- IF GENERATING68K THEN
- _LaunchApplication: OPWORD $A9F2
- ELSE
- IMPORT LaunchApplication
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _LaunchDeskAccessory
- move.w #$0036,-(sp)
- dc.w $A88F
- EndM
- ELSE
- IMPORT LaunchDeskAccessory
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetCurrentProcess
- move.w #$0037,-(sp)
- dc.w $A88F
- EndM
- ELSE
- IMPORT GetCurrentProcess
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetFrontProcess
- dc.w $70FF
- dc.w $2F00
- move.w #$0039,-(sp)
- dc.w $A88F
- EndM
- ELSE
- IMPORT GetFrontProcess
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetNextProcess
- move.w #$0038,-(sp)
- dc.w $A88F
- EndM
- ELSE
- IMPORT GetNextProcess
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetProcessInformation
- move.w #$003A,-(sp)
- dc.w $A88F
- EndM
- ELSE
- IMPORT GetProcessInformation
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetFrontProcess
- move.w #$003B,-(sp)
- dc.w $A88F
- EndM
- ELSE
- IMPORT SetFrontProcess
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _WakeUpProcess
- move.w #$003C,-(sp)
- dc.w $A88F
- EndM
- ELSE
- IMPORT WakeUpProcess
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SameProcess
- move.w #$003D,-(sp)
- dc.w $A88F
- EndM
- ELSE
- IMPORT SameProcess
- ENDIF
-
- ENDIF ; __PROCESSES__
-